<!DOCTYPE html> {% load static %}
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Dashboard">
    <meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <title>学生互评</title>
    <!-- Bootstrap core CSS -->
    <link href="{% static 'lib/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
    <!--external css-->
    <link href="{% static 'lib/font-awesome/css/font-awesome.css' %}" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="{% static 'css/style.css' %}" rel="stylesheet">
    <link href="{% static 'css/style-responsive.css' %}" rel="stylesheet">
    <style>
        .zhezhao {
            width: 100%;
            height: 100%;
            background-color: #333333;
            opacity: 0.3;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1;
            display: none;
        }
    </style>


</head>

<body>
    <section id="container">
        <!-- **********************************************************************************************************************************************************
        TOP BAR CONTENT & NOTIFICATIONS
        *********************************************************************************************************************************************************** -->
        <!--header start-->
        <header class="header black-bg">
            <div class="sidebar-toggle-box">
                <div class="fa fa-bars tooltips" data-placement="right" data-original-title="Toggle Navigation"></div>
            </div>
            <!--logo start-->
            <a href="index.html" class="logo"><b>奖助学金评定<span>系统</span></b></a>
            <!--logo end-->
            <div class="nav notify-row" id="top_menu">
                <!--  notification start -->
                <ul class="nav top-menu">
                    <!-- inbox dropdown start-->
                    <li id="header_inbox_bar" class="dropdown">
                        <a data-toggle="dropdown" class="dropdown-toggle" href="index.html#">
                            <i class="fa fa-envelope-o"></i>
                            {% if no_read_message_count != 0 %} <span class="badge bg-theme">{{ no_read_message_count }}</span>{% endif %}
                        </a>
                        <ul class="dropdown-menu extended inbox">
                            <div class="notify-arrow notify-arrow-green"></div>
                            <li>
                                <p class="green">你有{{ no_read_message_count }} 条信息未读</p>
                            </li>
                            {% for no_read_message in no_read_message_list %}
                            <li>
                                <a href="{% url 'dataManagement:messageShow' no_read_message.id %}">
                                    <span class="photo"><i class="fa fa-envelope-o"></i></span>
                                    <span class="subject">
                    <span class="from">来自{{ no_read_message.from_user }}</span>
                                    <span class="time">{{ no_read_message.send_time }}</span>
                                    </span>
                                    <span class="message">
                      {{ no_read_message.text | truncatechars:17 }}...
                    </span>
                                </a>
                            </li>
                            {% empty %} 暂无消息 {% endfor %}
                        </ul>
                    </li>
                    <!-- inbox dropdown end -->
                </ul>
                <!--  notification end -->
            </div>
            <div class="top-menu">
                <ul class="nav pull-right top-menu">
                    <li><a class="logout" href="{% url 'MyUser:logout' %}">退出</a></li>
                </ul>
            </div>
        </header>
        <!--header end-->
        <!-- **********************************************************************************************************************************************************
        MAIN SIDEBAR MENU
        *********************************************************************************************************************************************************** -->
        <!--sidebar start-->
        <aside>
            <div id="sidebar" class="nav-collapse ">
                <!-- sidebar menu start-->
                <ul class="sidebar-menu" id="nav-accordion">
                    <h5 class="centered">{% if request.user.name %}你好!&nbsp; {{ request.user.name }}{% else %} 请完善个人信息! {% endif %}</h5>
                    <li class="mt">
                        <a href="{% url 'dataManagement:index' %}">
                            <i class="fa fa-dashboard"></i>
                            <span>首页</span>
                        </a>
                    </li>
                    <li class="sub-menu">
                        <a href="javascript:;">
                            <i class="fa fa-desktop"></i>
                            <span>设置</span>
                        </a>
                        <ul class="sub">
                            <li><a href="{% url 'dataManagement:myinfo' %}">我的信息</a></li>
                            <li><a href="{% url 'dataManagement:setPassword' %}">修改密码</a></li>
                        </ul>
                    </li>
                    <li class="sub-menu">
                        <a class="active" href="javascript:;">
                            <i class="fa fa-cogs"></i>
                            <span>评审信息</span>
                        </a>
                        <ul class="sub">
                            <li class="active"><a href="{% url 'dataManagement:requestLog' %}">申请记录</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="{% url 'dataManagement:messageIndex' %}?num=1&&choice=1">
                            <i class="fa fa-envelope"></i>
                            <span>消息</span>
                            <span class="label label-theme pull-right mail-info">{{ no_read_message_count }}</span>
                        </a>
                    </li>
                </ul>
                <!-- sidebar menu end-->
            </div>
        </aside>
        <!--sidebar end-->
        <!-- **********************************************************************************************************************************************************
        MAIN CONTENT
        *********************************************************************************************************************************************************** -->
        <!--main content start-->
        <!--    -->
        <section id="main-content">
            <section class="wrapper site-min-height">
                <h3><i class="fa fa-angle-right"></i> {{ meeting_obj.title }} &nbsp;&nbsp;<span style="font-size: 15px;">结束时间:<span class="endTime">{{ meeting_obj.endTime }}</span></span>
                </h3>
                <!-- /row -->
                <input type="text" class="applicatinFormId" value="{{ application_form_student.id }}" hidden>
                <input type="text" class="meeting_id" value="{{ meeting_obj.id }}" hidden> {% if this_status %}
                <div style="text-align: center; margin-top: 20%">
                    <h1>{{this_status}}</h1>
                </div>

                {% else %}
                <div class="row content-panel">

                    <div class="col-md-10 col-md-offset-1 mt mb">
                        <h2 class="centered">学生互评</h2>
                        <div class="accordion" id="accordion2">
                            <div class="accordion-group">
                                <div class="accordion-heading">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapseOne">
                                        <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>学生简介
                                    </a>
                                </div>
                                <div id="collapseOne" class="accordion-body collapse in">
                                    <div class="accordion-inner">
                                        <div class="panel panel-default">
                                            <div class="panel-body">
                                                {{ application_form_student.presentation }}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="accordion-group">
                                <div class="accordion-heading">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapseTwo">
                                        <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>学术活动简介
                                    </a>
                                </div>
                                <div id="collapseTwo" class="accordion-body collapse">
                                    <div class="accordion-inner">
                                        <div class="panel panel-default">
                                            <div class="panel-body">
                                                {{ application_form_student.presentation }}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="accordion-group">
                                <div class="accordion-heading">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapseThree">
                                        <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>学术活动文件
                                    </a>
                                </div>
                                <div id="collapseThree" class="accordion-body collapse">
                                    <div class="accordion-inner">
                                        <div class="panel panel-default">
                                            <div class="panel-body">
                                                {% for student_academicActivityImage in student_academicActivityImages %}
                                                <div class="panel panel-default col-lg-4 col-md-4 col-sm-4 col-xs-12 desc" style="width: 200px; height: 200px; margin-right: 20px; padding: 0px">
                                                    <div class="panel-heading img-title">{{ student_academicActivityImage.name }}</div>
                                                    <div class="panel-body" style="padding: 0px;">
                                                        <img style="width: 200px;" src="/media/{{ student_academicActivityImage.academicActivityImage }}" onclick="showimage('/media/{{ student_academicActivityImage.academicActivityImage }}')" alt="">
                                                    </div>
                                                </div>
                                                {% empty %} 暂无数据 {% endfor %}
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--              发表论文-->
                            <div class="accordion-group">
                                <div class="accordion-heading">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapseFour">
                                        <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>发表论文简介
                                    </a>
                                </div>
                                <div id="collapseFour" class="accordion-body collapse">
                                    <div class="accordion-inner">
                                        <div class="panel panel-default">
                                            <div class="panel-body">
                                                {{ application_form_student.publicationsText }}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="accordion-group">
                                <div class="accordion-heading">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapsefive">
                                        <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>发表论文文件
                                    </a>
                                </div>
                                <div id="collapsefive" class="accordion-body collapse">
                                    <div class="accordion-inner">
                                        <div class="panel panel-default">
                                            <div class="panel-body">
                                                {% for student_publicationsImage in student_publicationsImages %}
                                                <div class="panel panel-default col-lg-4 col-md-4 col-sm-4 col-xs-12 desc" style="width: 200px; height: 200px; margin-right: 20px; padding: 0px">
                                                    <div class="panel-heading img-title">{{ student_publicationsImage.name }}</div>
                                                    <div class="panel-body" style="padding: 0px;">
                                                        <img style="width: 200px;" src="/media/{{ student_publicationsImage.publicationsImage }}" onclick="showimage('/media/{{ student_publicationsImage.publicationsImage }}')" alt="">
                                                    </div>
                                                </div>
                                                {% empty %} 暂无数据 {% endfor %}
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--              end-->
                            <!--              参与项目-->
                            <div class="accordion-group">
                                <div class="accordion-heading">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapse6">
                                        <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>参与项目简介
                                    </a>
                                </div>
                                <div id="collapse6" class="accordion-body collapse">
                                    <div class="accordion-inner">
                                        <div class="panel panel-default">
                                            <div class="panel-body">
                                                {{ application_form_student.participateItemsText }}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="accordion-group">
                                <div class="accordion-heading">
                                    <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapse7">
                                        <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>参与项目文件
                                    </a>
                                </div>
                                <div id="collapse7" class="accordion-body collapse">
                                    <div class="accordion-inner">
                                        <div class="panel panel-default">
                                            <div class="panel-body">
                                                {% for student_participateItemsImage in student_participateItemsImages %}
                                                <div class="panel panel-default col-lg-4 col-md-4 col-sm-4 col-xs-12 desc" style="width: 200px; height: 200px; margin-right: 20px; padding: 0px">
                                                    <div class="panel-heading img-title">{{ student_participateItemsImage.name }}</div>
                                                    <div class="panel-body" style="padding: 0px;">
                                                        <img style="width: 200px;" src="/media/{{ student_participateItemsImage.participateItemsImage }}" onclick="showimage('/media/{{ student_participateItemsImage.participateItemsImage }}')" alt="">
                                                    </div>
                                                </div>
                                                {% empty %} 暂无数据 {% endfor %}
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--              end-->
                        <!--              科研项目-->
                        <div class="accordion-group">
                            <div class="accordion-heading">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapse8">
                                    <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>科研项目简介
                                </a>
                            </div>
                            <div id="collapse8" class="accordion-body collapse">
                                <div class="accordion-inner">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            {{ application_form_student.researchProjectsText }}
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="accordion-group">
                            <div class="accordion-heading">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapse9">
                                    <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>科研项目文件
                                </a>
                            </div>
                            <div id="collapse9" class="accordion-body collapse">
                                <div class="accordion-inner">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            {% for student_researchProjectsImage in student_researchProjectsImages %}
                                            <div class="panel panel-default col-lg-4 col-md-4 col-sm-4 col-xs-12 desc" style="width: 200px; height: 200px; margin-right: 20px; padding: 0px">
                                                <div class="panel-heading img-title">{{ student_researchProjectsImage.name }}</div>
                                                <div class="panel-body" style="padding: 0px;">
                                                    <img style="width: 200px;" src="/media/{{ student_researchProjectsImage.researchProjectsImage }}" onclick="showimage('/media/{{ student_researchProjectsImage.researchProjectsImage }}')" alt="">
                                                </div>
                                            </div>
                                            {% empty %} 暂无数据 {% endfor %}
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- 研究生创新项目 -->
                        <div class="accordion-group">
                            <div class="accordion-heading">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapse10">
                                    <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>研究生创新项目简介
                                </a>
                            </div>
                            <div id="collapse10" class="accordion-body collapse">
                                <div class="accordion-inner">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            {{ application_form_student.innovationProjectsText }}
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="accordion-group">
                            <div class="accordion-heading">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapse11">
                                    <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>研究生创新项目文件
                                </a>
                            </div>
                            <div id="collapse11" class="accordion-body collapse">
                                <div class="accordion-inner">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            {% for student_innovationProjectsImage in student_innovationProjectsImages %}
                                            <div class="panel panel-default col-lg-4 col-md-4 col-sm-4 col-xs-12 desc" style="width: 200px; height: 200px; margin-right: 20px; padding: 0px">
                                                <div class="panel-heading img-title">{{ student_innovationProjectsImage.name }}</div>
                                                <div class="panel-body" style="padding: 0px;">
                                                    <img style="width: 200px;" src="/media/{{ student_innovationProjectsImage.innovationProjectsImage }}" onclick="showimage('/media/{{ student_innovationProjectsImage.innovationProjectsImage }}')" alt="">
                                                </div>
                                            </div>
                                            {% empty %} 暂无数据 {% endfor %}
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--              社会服务-->
                        <div class="accordion-group">
                            <div class="accordion-heading">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapse12">
                                    <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>社会服务简介
                                </a>
                            </div>
                            <div id="collapse12" class="accordion-body collapse">
                                <div class="accordion-inner">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            {{ application_form_student.socialWorkText }}
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="accordion-group">
                            <div class="accordion-heading">
                                <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="faq.html#collapse13">
                                    <em class="glyphicon glyphicon-chevron-right icon-fixed-width"></em>社会服务文件
                                </a>
                            </div>
                            <div id="collapse13" class="accordion-body collapse">
                                <div class="accordion-inner">
                                    <div class="panel panel-default">
                                        <div class="panel-body">
                                            {% for student_socialWorkImage in student_socialWorkImages %}
                                            <div class="panel panel-default col-lg-4 col-md-4 col-sm-4 col-xs-12 desc" style="width: 200px; height: 200px; margin-right: 20px; padding: 0px">
                                                <div class="panel-heading img-title">{{ student_socialWorkImage.name }}</div>
                                                <div class="panel-body" style="padding: 0px;">
                                                    <img style="width: 200px;" src="/media/{{ student_socialWorkImage.socialWorkImage }}" onclick="showimage('/media/{{ student_socialWorkImage.socialWorkImage }}')" alt="">
                                                </div>
                                            </div>
                                            {% empty %} 暂无数据 {% endfor %}
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        </br>
                        <div class="row" style="border-top: 1px solid grey">
                            <div class="col-xs-12 col-md-6 col-lg-3 " style="margin-top: 10px;">
                                <span style="font-size: 20px;">学生互评(满分10分):</span>
                            </div>
                            <div class="col-xs-12 col-md-5 col-lg-3" style="margin-top: 10px;">
                                <input type="number" min="0" max="10" class="form-control" id="grade" placeholder="填写分数" {% if student_otherGrade %}readonly{% endif %} value="{{ student_otherGrade }}">
                                <button type="button" class="btn btn-primary submit-grade" style="float: right; {% if student_otherGrade %}display: none; {% endif %} margin-top: 10px;">提交</button>
                            </div>
                            <!--                <input style="width: 300px; float: right" type="number" min="0" max="10" class="form-control" id="grade" placeholder="填写分数" {% if student_otherGrade %}readonly{% endif %} value="{{ student_otherGrade }}"> <button type="button" class="btn btn-primary submit-grade"  style="float: right; {% if student_otherGrade %}display: none; {% endif %}" >提交</button></span>-->
                            <br>
                        </div>
                    </div>
                    <!-- end accordion -->
                </div>
                {% endif %}
                <!-- col-md-10 -->
                </div>
                <!--  /row -->
            </section>
            <!-- /wrapper -->
        </section>
        <!-- /MAIN CONTENT -->
        <!--main content end-->
    </section>

    <!--  模态框 -->
    <div class="zhezhao"></div>

    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="overflow-y:scroll" aria-hidden="true">
        <div class="modal_cotent" style="text-align: center;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">模态框（Modal）标题</h4>
            </div>
            <img class="model_img" alt="">
        </div>
    </div>
    <!-- js placed at the end of the document so the pages load faster -->
    <script src="{% static 'lib/jquery/jquery.min.js' %}"></script>
    <script src="{% static 'lib/bootstrap/js/bootstrap.min.js' %}"></script>
    <script class="include" type="text/javascript" src="{% static 'lib/jquery.dcjqaccordion.2.7.js' %}"></script>
    <script src="{% static 'lib/jquery.scrollTo.min.js' %}"></script>
    <script src="{% static 'lib/jquery.nicescroll.js' %}" type="text/javascript"></script>
    <!--common script for all pages-->
    <script src="{% static 'lib/common-scripts.js' %}"></script>
    <script>
        function showimage(source) {
            var ww = $(window).width(); //当前浏览器可视宽度
            $(".model_img").attr('src', source);
            $(".model_img").css({
                "width": ww,
                'left': "0px"
            })
            $(document.body).css({
                "overflow-y": "hidden"
            })
            $(".modal-title").text(source.split("/")[3])
                // $(".modal-header").css()
            $("#myModal").show();
            $("#myModal").attr("class", "modal fade in")
            $(".zhezhao").show();
        }
        $(".close").click(function() {
            $(".zhezhao").hide();
            $("#myModal").hide();
        })
        $(".close").click(function() {
                $(document.body).css({
                    "overflow-y": "auto"
                })
            })
            // $(document).ready(function () {
            //
            // })
        $(".submit-grade").click(function() {
            var number = $("#grade").val();
            if (number > 10 || number < 0 || number == "") {
                alert("请输入正确的分数")
            } else {
                var applicationFormId = $(".applicatinFormId").val();
                var meeting_id = $(".meeting_id").val();
                $.ajax({
                    url: "{% url 'dataManagement:peerAssessment' %}",
                    type: 'post',
                    cache: false,
                    data: {
                        "applicationFormId": applicationFormId,
                        "meeting_id": meeting_id,
                        "number": number,
                        csrfmiddlewaretoken: '{{ csrf_token }}'
                    },
                    success: function(data) {
                        if (data.status == "成功") {
                            $("#grade").attr("readOnly", "true");
                            $(".submit-grade").hide();
                        }
                        alert(data.status)
                    }
                })
            }
        });
        $(document).ready(function() {
            if ("{{ timeStatus }}") {
                $(":input").attr("disabled", "disabled");
                $(".submit-grade").hide();

            }

        });
    </script>
</body>

</html>